#!/bin/sh /etc/rc.common

START=60

lease_file=/var/dhclient6.leases
config_file=/etc/dhclient6.conf
pid_file=/var/run/dhclient6.pid
script_file=/usr/sbin/dhclient-script

start() {
	local ifname

	. /lib/functions/network.sh

	network_get_device ifname "wan" || return 1

	/usr/sbin/dhclient -q -nw -6 -cf $config_file -lf $lease_file -pf $pid_file -sf $script_file $ifname

	[ $? -eq 0 ] || return 1
}

stop() {
	[ -e $pid_file ] || return 1

	kill -9 $(cat $pid_file)

	[ $? -eq 0 ] || return 1

	rm $pid_file
}
